package com.fzk.blog.exception;

/**
 * @author fzk
 * @date 2021-07-15 10:44
 */
public class MyException extends RuntimeException {
    private final int code;

    public MyException(String message) {
        super(message);
        this.code = 400;//默认为400
    }

    public MyException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode(){
        return code;
    }
}
